<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GradeGrid - Create Template</title>
<script src="template.js" type="text/javascript"></script>
</head>
<body onload="window.resizeTo(760,500)">
<h2>Create New Template<br/><span style="font-size:11px;">NOTE: All fields are REQUIRED. Percentages and max raw scores must be numbers and percentages must total to 100.</span></h2>
<form id="templateSheet" action="pushTemplate.php" method="post">
<?php if($_GET['retry']!=1){?>
    	<table>
        	<tr>
            	<td>Template Name</td>
                <td><input name="template" type="text"></td>
            </tr>
        </table>
        Major Requirements <input type="button" onclick="addMaj();" value="Add more">
        <ul><table id="maj" border="1" align="center">
            <tr>
                <td><li>Name</li></td>
                <td><input name="majName0" type="text"></td>
                <td>Percentage</td>
                <td><input name="majPer0" type="text"></td>
			</tr>
            <tr><td colspan="4"><li>Minor Requirements <input type="button" onclick="addMin(0);" value="Add more"></li></td></tr>
            <tr><td colspan="4">
            	<table id="min0">
                	<tr>
                        <td><ul><li>Name</li></ul></td>
                        <td><input name="minName00" type="text"></td>
                        <td>Max Raw Score</td>
                        <td><input name="minSco00" type="text"></td>
					</tr>
                </table>
            </td></tr>
            <tr><td colspan="4" align="right" id="saveRow"><input type="submit" value="Save" onclick="prepAndSubmit()"></td></tr>
        </table></ul>
    </form>
<?php }else{ include("retryTemplate.php"); }?>
	<div style="font-size:9px; width:100%" align="center">GradeGrid Copyright</div>
</body>
</html>